package com.joysuch.wwyt.bp.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 描述：计划状态类型枚举<br>
 *
 * @author jingwk<br>
 * @version 1.0 <br>
 * 日期:2021年09月15日 上午10:57:00
 */
public enum RepairStatus {

    NO_RECTIFICATION_REQUIRED(0, "无需整改"),
    PROCESSED(1, "已处理"),
    NOT_RECTIFIED(2, "未整改"),
    WAITING_FOR_PROCESSING(3, "等待处理"),
    NO_PROCESSING_REQUIRED(4, "无需处理"),
    ;

    private Integer value;

    private String desc;

    RepairStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<Integer, RepairStatus> lookup = new HashMap<>();

    static {
        for (RepairStatus e : EnumSet.allOf(RepairStatus.class)) {
            lookup.put(e.value, e);
        }
    }

    public static RepairStatus find(Integer value) {
        return lookup.get(value);
    }
}
